<template>
	<view class="page">
		<navBar nowPath="/pages/index/index" appname="" @toLogin="toLogin" @register="showRegister=true"></navBar>
		<block v-if="showLogin">
			<Login :showLogin="showLogin" @close="showLogin=false" @toRegister="showRegister=true"></Login>
		</block>
		<block v-if="showRegister">
			<Register :showRegister="showRegister" @close="showRegister=false" @toLogin="showLogin=true"></Register>
		</block>
		<view class="index-top">
			<view class="index-second">
				<view class="index-second-left">
					<view class="notice" style="font-size:1.0rem;font-weight:500;color:#304CE1">
						<p>
							🔻快速指南🔻
						</p>
						<p>1、交易所使用教程：强烈推荐【火必交易所】T0即买即用,世界前三交易所👈</p>
						<p> 火必官网：<a href="https://huobi.com">https://huobi.com</a></p>
						<p> 2、购买充值卡 「 选择充值卡 → 提币至购卡时所需地址 → 系统自动发卡密 」</p>
						<p> 3、闲鱼回收 「 闲鱼底部加号 →极速回收 → 全部品类 → 卖卡券 → 填写卡密 → 自动打款至您闲鱼绑定的支付宝 」</p>
					</view>
					<view class="addtojoin">
						<u-button text="查看代理政策" class="proxy-style"
							color="linear-gradient(56.47deg, #2f9b90 -12.04%, #dbf733 114.89%)"></u-button>
						<u-button text="查看保姆级教程" class="proxy-style" color="#e84118"></u-button>
					</view>
				</view>
				<view class="index-second-right">
					<image src="/static/zshy.a228e460.png"></image>
				</view>

			</view>
		</view>
		<view class="index-simple">

		</view>
		<view class="indexEvaluate">

		</view>
	</view>
</template>

<script>
	import navBar from '@/components/yz-navbar/navBar.vue'
	import Login from './components/login.vue'
	import Register from './components/register.vue'
	import {
		getHomeGoodsGuessLikeAPI
	} from "@/api/home.js"
	export default {
		mixins: [],
		components: {
			navBar,
			Login,
			Register
		},
		data() {
			return {
				showLogin: false,
				showRegister: false

			}
		},
		methods: {
			toLogin() {
				console.log('登录');
				this.open()

			},
			open() {
				this.showLogin = true
			},
			close() {
				// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ，type 属性将失效 ，仅支持 ['top','left','bottom','right','center']
				this.showLogin = false
			}
		}
	}
</script>
<style lang="scss" scoped>
	.page {
		background-color: #eee;

		.navbar {
			padding: 0 40rpx;
			box-sizing: border-box;
		}

		.index-top {
			width: 100%;
			height: auto;
			background: url(/static/headerbg.ab952e95.png) no-repeat;
			background-size: 100%;
			height: 800px;
			background-color: #fff;

			.index-second {
				width: 73%;
				display: flex;
				margin: auto;
				padding-top: 183px;

				.index-second-left {
					width: 55%;

					.addtojoin {
						width: 100%;
						margin-top: 6.5%;
						text-align: left;
						display: flex;
					}

					.proxy-style {
						width: 320rpx;
						box-shadow: 0 10px 20px rgba(78, 172, 126, .3);
						border-radius: 50px;
						color: #fff;
						margin: 0 20rpx 0 0 !important;
					}
				}

				.index-second-right {
					width: 45%;

					image {
						width: 80%;
						height: 350px;

						margin-top: 4%;
					}
				}

			}
		}

		.index-simple {
			background: url(/static/middlebg.99569197.png) no-repeat;
			background-size: 100% 100%;
			margin-top: -5%;
			padding-top: 285px;
			height: auto;
			padding-bottom: 3.5%;
		}

		.indexEvaluate {
			background: url(/static/footerbg.fc9a13e9.png) no-repeat;
			background-size: cover;
			height: auto;
			margin: 1% auto 0;
			padding-bottom: 2%;
		}
	}
</style>